<?php
/**
 * Expenses Main Screen
 * 
 * Display Actual Expense List and Add an expense button
 * 
 */

use Fox\Html\Header\Image;
use Fox\Html\Screen;
use Fox\Html\TabPanel\Tab;
use Fox\Html\TabPanel;
use Fox\Dao\SqlFragment;
use Hive\Expense;


$screen = new Screen('mExpenses');
$screen->mainTitle(new Image("expenses",MSG(Expense::MSGCL,7)));
$panel = new TabPanel("tpExpense");
// List of Expense that have not been sent or validated
$gToSend = Xview::instance()->component("expenses","tosend");
$tosend = new Tab('tTosend',Msg(Expense::MSGCL,8),$gToSend);
$panel->add($tosend);
// List of Expense waiting for validation
$gWaiting = Xview::instance()->component("expenses","waiting");
$waiting = new Tab('tWaiting',Msg(Expense::MSGCL,9),$gWaiting);

$panel->add($waiting);
// List of Expense validated
$gValidated = Xview::instance()->component("expenses","validated");
$validated = new Tab('tValidated',Msg(Expense::MSGCL,10),$gValidated);
$panel->add($validated);
// List of Expense Refused
$gRefused = Xview::instance()->component("expenses","refused");
$refused = new Tab('tRefused',Msg(Expense::MSGCL,11),$gRefused);
$panel->add($refused);
$screen->add($panel);
echo $screen->display();